home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 376-400 / 376 / plotter / src / makemenu.c < prev    next >
Text File  |  1995-03-14  |  5KB  |  122 lines

  1.  /********************************************************************/
  2.  /****                                                            ****/
  3.  /****                                                            ****/
  4.  /****    Program          : MakeMenu für Plotter                 ****/
  5.  /****                                                            ****/
  6.  /****    Version          :     3.71                             ****/
  7.  /****                                                            ****/
  8.  /****    Erstversion      : 30.04.1990                           ****/
  9.  /****                                                            ****/
  10.  /****    Letzte Änderung  : 05.08.1990                           ****/
  11.  /****                                                            ****/
  12.  /****    Compiliert mit   : siehe MAKEFILE                       ****/
  13.  /****                                                            ****/
  14.  /****    Gelinkt mit      : siehe MAKEFILE                       ****/
  15.  /****                                                            ****/
  16.  /********************************************************************/
  17.  /****                                                            ****/
  18.  /****                                                            ****/
  19.  /****               Copyright by Rüdiger Dreier                  ****/
  20.  /****                                                            ****/
  21.  /****                                                            ****/
  22.  /********************************************************************/
  23.  
  24.  #ifdef DEBUG
  25.  #include "Plotter.h"
  26.  #include <proto/tool.h>
  27.  #endif
  28.  #include <string.h>
  29.  #include <devices/printer.h>
  30.  #include <intuition/intuitionbase.h>
  31.  #include <graphics/regions.h>
  32.  #include <proto/mathieeedoubbas.h>
  33.  #include <proto/mathieeedoubtrans.h>
  34.  #include <proto/layers.h>
  35.  #include <math.h>
  36.  #include <stdio.h>
  37.  #include <string.h>
  38.  #include <stdlib.h>
  39.  #include <exec/memory.h>
  40.  #include <exec/tasks.h>
  41.  #include <libraries/dosextens.h>
  42.  #include <dos.h>
  43.  
  44.  struct Menu *Menu;
  45.  
  46.  struct MenuItem *Item[7]; /* Zum Sichern der Zeiger */
  47.  
  48.  VOID MakeMenu(VOID)
  49.   {
  50.    struct MenuItem *item;
  51.    SHORT i;
  52.    
  53.    /* Damit das Menu breit genug wird */
  54.    for(i=0;i<=9;i++)
  55.     {
  56.      strcpy(SubMenuTitle[i],"123456789012345");
  57.     }
  58.    
  59.    
  60.    Menu=AddMenu(Menu," C-Plot",MENUENABLED);
  61.    item=AddItem(Menu,"Genauigkeit",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  62.    ((struct IntuiText *)item->ItemFill)->FrontPen=FARBE2;
  63.    
  64.    item=AddSub(Menu,"  klein",ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT|COMMSEQ,'1');
  65.    item->MutualExclude=6;
  66.    item=AddSub(Menu,"  mittel",ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT|CHECKED|COMMSEQ,'2');
  67.    item->MutualExclude=5;
  68.    item=AddSub(Menu,"  groß",ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT|COMMSEQ,'3');
  69.    item->MutualExclude=3;
  70.    AddItem(Menu,"Intervall",ITEMTEXT|ITEMENABLED|HIGHCOMP|COMMSEQ,'I');
  71.    AddItem(Menu,"Löschen",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  72.    AddItem(Menu,"Drucken",ITEMTEXT|ITEMENABLED|HIGHCOMP|COMMSEQ,'D');
  73.    AddItem(Menu,"Bereich m. Maus",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  74.    AddItem(Menu,"Konstanten",ITEMTEXT|ITEMENABLED|HIGHCOMP|COMMSEQ,'K');
  75.    AddItem(Menu,"About",ITEMTEXT|ITEMENABLED|HIGHCOMP|COMMSEQ,'A');
  76.    AddItem(Menu,"ENDE",ITEMTEXT|ITEMENABLED|HIGHCOMP|COMMSEQ,'Q');
  77.    
  78.    AddMenu(Menu," Funktion",MENUENABLED);
  79.    Item[0]= AddItem(Menu,"Ändern",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  80.    AddSub(Menu,SubMenuTitle[0],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  81.    AddSub(Menu,SubMenuTitle[1],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  82.    AddSub(Menu,SubMenuTitle[2],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  83.    AddSub(Menu,SubMenuTitle[3],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  84.    AddSub(Menu,SubMenuTitle[4],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  85.    AddSub(Menu,SubMenuTitle[5],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  86.    AddSub(Menu,SubMenuTitle[6],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  87.    AddSub(Menu,SubMenuTitle[7],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  88.    AddSub(Menu,SubMenuTitle[8],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  89.    AddSub(Menu,SubMenuTitle[9],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  90.    Item[1]=AddItem(Menu,"Funktion",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  91.    Item[1]->SubItem=Item[0]->SubItem;
  92.    Item[2]=AddItem(Menu,"1. Abl. Num.",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  93.    Item[2]->SubItem=Item[0]->SubItem;
  94.    Item[3]=AddItem(Menu,"2. Abl. Num.",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  95.    Item[3]->SubItem=Item[0]->SubItem;
  96.    AddItem(Menu,"------------",ITEMTEXT,0);
  97.    Item[4]=AddItem(Menu,"1. Abl. Sym.",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  98.    Item[4]->SubItem=Item[0]->SubItem;
  99.    Item[5]=AddItem(Menu,"2. Abl. Sym.",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  100.    Item[5]->SubItem=Item[0]->SubItem;
  101.    Item[6]=AddItem(Menu,"Diskussion",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
  102.    Item[6]->SubItem=Item[0]->SubItem;
  103.    AddMenu(Menu," Größe",MENUENABLED);
  104.    item=AddItem(Menu,"   640 x 256",ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT|CHECKED,0);
  105.    item->MutualExclude=2;
  106.    item=AddItem(Menu,"  1000 x 300",ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT,0);
  107.    item->MutualExclude=1;
  108.   }
  109.  
  110.  VOID __asm ReMakeMenu(register __a0 struct Window *Window)
  111.   {
  112.    SHORT i;
  113.    for(i=1;i<=6;i++)
  114.     {
  115.      Item[i]->SubItem=0;
  116.     }
  117.    ClearMenu(Window->MenuStrip);
  118.    ClearMenuStrip(Window);
  119.   }
  120.  
  121.  
  122.